-- GENERATED SPELL FOR [Infinite Agent] --


function spell0_27744(pUnit, Event) --@Arcane Wave,n/a--
pUnit:FullCastSpellOnTarget(52660,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27744', 2500, 1)
end

function spell1_27744(pUnit, Event) --@Arcane Wave,n/a--
pUnit:FullCastSpellOnTarget(58817,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27744', 2000, 1)
end

function spell2_27744(pUnit, Event) --@Temporal Vortex,n/a--
pUnit:FullCastSpellOnTarget(52657,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27744', 5000, 1)
end

function spell3_27744(pUnit, Event) --@Temporal Vortex,n/a--
pUnit:FullCastSpellOnTarget(58816,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_27744', 5000, 1)
end

function Sorts_27744(pUnit, Event)
local choix_sorts_27744 = math.random(0, 3)
if choix_sorts_27744 == 0 then
pUnit:RegisterEvent('spell0_27744', 1, 1)
end
if choix_sorts_27744 == 1 then
pUnit:RegisterEvent('spell1_27744', 1, 1)
end
if choix_sorts_27744 == 2 then
pUnit:RegisterEvent('spell2_27744', 1, 1)
end
if choix_sorts_27744 == 3 then
pUnit:RegisterEvent('spell3_27744', 1, 1)
end
end

function mob27744_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_27744', math.random(1500, 3000), 1)
end

function mob27744_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27744_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob27744_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(27744, 1, 'mob27744_Action')
RegisterUnitEvent(27744, 2, 'mob27744_Leave')
RegisterUnitEvent(27744, 3, 'mob27744_Kill')
RegisterUnitEvent(27744, 4, 'mob27744_Die')
